<template>
	<view>
		<view class="tabs">
			<u-tabs
				:list="list1"
				lineColor="#4BC264"
				@change="change"
				:current="current"
				:activeStyle="{
					color: '#1C274C',
					fontWeight: 'bold',
					transform: 'scale(1.02)'
				}"
				:inactiveStyle="{
					color: '#A4A9B7',
					transform: 'scale(1)'
				}"
				itemStyle="padding-left: 40px; padding-right: 40px; height: 42px;"
			></u-tabs>
		</view>
		
		<!-- 未过期 -->
		<template v-if="current == 0">
			<view class="card-box">
				<image class="bac-img" src="../../static/index/month-card.png" mode=""></image>
				<view class="info white1">
					<image src="../../static/my-activate.png" mode=""></image>
					24H自助台球(红旗路店)
				</view>
				<view class="deadline white1">畅打卡月卡（30天）</view>
				<view class="time white2">每天上午8:00-下午15:00可免费畅打</view>
				<view class="btm-text white2">仅限该单店可用，其他门店不通用</view>
			</view>
		</template>
		
		<!-- 已过期 -->
		<template v-if="current == 1">
			<view class="card-box">
				<image class="bac-img" src="../../static/index/month-card2.png" mode=""></image>
				<view class="info">
					<image src="../../static/my-activate.png" mode=""></image>
					24H自助台球(红旗路店)
				</view>
				<view class="deadline">畅打卡月卡（30天）</view>
				<view class="time">每天上午8:00-下午15:00可免费畅打</view>
				<view class="btm-text">仅限该单店可用，其他门店不通用</view>
			</view>
		</template>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list1: [
					{
						name: '未过期'
					},
					{
						name: '已过期'
					}
				],
				current: 0,
			}
		},
		methods: {
			change(e) {
				console.log(e);
				this.current = e.index;
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #F7F8FA;
	}
	.tabs {
		padding: 0 32rpx;
		display: flex;
		justify-content: center;
	}
	
	.card-box {
		width: 622rpx;
		height: 320rpx;
		position: relative;
		margin: auto;
		padding: 32rpx;
		margin-top: 24rpx;
		color: #A4A9B7;
		.white1 {
			color: #FFFFFF;
		}
		.white2 {
			color: rgba(255,255,255,0.7);
		}
		.bac-img {
			width: 686rpx;
			height: 384rpx;
			position: absolute;
			top: 0;
			left: 0;
		}
		.info {
			position: relative;
			image {
				width: 36rpx;
				height: 36rpx;
				vertical-align: middle;
				margin-right: 16rpx;
			}
			font-weight: 500;
			font-size: 24rpx;
		}
		.deadline {
			position: relative;
			font-weight: 800;
			font-size: 36rpx;
			margin-top: 33rpx;
		}
		.time {
			position: relative;
			font-weight: 500;
			font-size: 22rpx;
			margin-top: 19rpx;
		}
		.btm-text {
			font-weight: 500;
			font-size: 22rpx;
			position: absolute;
			bottom: 42rpx;
		}
	}
</style>
